<? 
/**
 * Product: 	ImageShack Uploader 
 * Version: 	2.6
 * Author: 		chiplove.9xpro
 * Website: 	http://chiplove.biz
*/

session_start();
define('DIR', dirname(__FILE__));

include (DIR . '/class/class_imageshack.php');
require_once("../config/database.php");
	require_once("../inc/class.db.php");

	
	$dbx = new DB($namedb, $serverdb, $userdb, $passdb);
	
	


$ob =& new ImageShackUploader;
$ob->login = false;

$ob->sitename = $_GET['watermark'];
$ob->tempfolder = '../uploads/'; //create and CHMOD this folder to 777
$ob->watermark = ($_REQUEST['watermark'] == 'yes') ? true : false; // auto watermark true/false
$ob->watermark_file = DIR . '/1logo.png'; //logo watermark

// User & pass login to imageshack.us 

if($_FILES['Filedata']){

	$link = $ob->Upload($_FILES['Filedata']);
	echo 'image=' . $link;
}

if($_POST['url']){
	echo $ob->Transfer($_POST['url']);
}
?>